home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * @(#) tune.c 12.1 95/07/05 SCOINC
- */
- /***************************************************************************
- *
- * Copyright (c) 1990-1993 The Santa Cruz Operation, Inc.
- *
- * All rights reserved. No part of this program or publication may be
- * reproduced, transmitted, transcribed, stored in a retrieval system,
- * or translated into any language or computer language, in any form or
- * by any means, electronic, mechanical, magnetic, optical, chemical,
- * biological, or otherwise, without the prior written permission of:
- *
- * The Santa Cruz Operation , Inc. (408) 425-7222
- * 400 Encinal St., Santa Cruz, California 95060 USA
- *
- **************************************************************************/
- /*
- * Modification History
- *
- * S002, 27-May-93, rickra
- * Added support for pixmaps.
- *
- * S001, 01-Jan-93, rickra
- * Added support for seperate windows
- *
- * S000, 30-Sep-92, rickra
- * Added copyright and modification history
- */
- /*+-------------------------------------------------------------------------
- tune.c - XSW tune struct display
- wht@n4hgf.Mt-Park.GA.US
-
- Defined functions:
- draw_Tune(x,y)
-
- --------------------------------------------------------------------------*/
- /*+:EDITS:*/
- /*:09-25-1990-05:11-wht@n4hgf-release heh-heh x0.22 preliminary */
- /*:09-20-1990-03:08-wht@n4hgf-adapt u386mon code */
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
- #include <X11/Intrinsic.h>
- #include <X11/Shell.h>
- #include <Xm/Xm.h>
- #include <Xm/MainW.h>
- #include <Xm/DrawingA.h>
-
- #include "include/unixincs.h"
-
- extern struct NetworkXswStruct *current_server;
-
- #if defined(mips)
- #define t_gpgsmsk t_gpgslmsk
- #endif
-
- #include "include/buttons.h"
- #include "include/xsw.h"
-
- static int line_style = LineSolid;
- static int cap_style = CapButt;
- static int join_style = JoinMiter;
-
- /*+-------------------------------------------------------------------------
- draw_Tune(window,display,gc,DrawAreaXYWH,x,y)
- --------------------------------------------------------------------------*/
- int
- draw_Tune (SP, x, y)
- struct NetworkXswStruct *SP;
- int x;
- int y;
-
- {
- Window window = SP -> SEPERATE_WINDOWS_LIST[BUTTON_tune_var].window;
- Display *display = SP -> SEPERATE_WINDOWS_LIST[BUTTON_tune_var].display;
- GC gc = SP -> SEPERATE_WINDOWS_LIST[BUTTON_tune_var].gc;
- XWindowAttributes DrawAreaXYWH = SP -> SEPERATE_WINDOWS_LIST[BUTTON_tune_var].DrawAreaXYWH;
- Pixmap pixmap = SP -> SEPERATE_WINDOWS_LIST[BUTTON_tune_var].pixmap;
-
- char *cptr;
- int fwidth = FWIDTH;
- int fheight = FHEIGHT;
- int len;
- int x2 = x;
- int yl1 = y + (FASCENT / 2);
- int yl2 = y + (fheight / 2) - 1;
- int ys = y + FASCENT;
-
-
- cptr = "---Tune----------";
- len = strlen (cptr);
- /* the "background" bar */
- XSetForeground (display, gc, colorTitleBarBG.pixel);
- XSetLineAttributes (display, gc, fheight, line_style, cap_style, join_style);
- /*
- XDrawLine (display, window, gc, x, yl1, x + (len * fwidth), yl1);
- */
- XDrawLine (display, pixmap, gc, x, yl1, x + (len * fwidth), yl1);
-
- /* draw the black line before "Tune" */
- XSetForeground (display, gc, colorTitleBarFG.pixel);
- XSetLineAttributes (display, gc, FASCENT / 2, line_style, cap_style, join_style);
- /*
- XDrawLine (display, window, gc,
- x2, yl1,
- x2 + (len = (fwidth * 3)) - FGAP, yl1);
- */
- XDrawLine (display, pixmap, gc,
- x2, yl1,
- x2 + (len = (fwidth * 3)) - FGAP, yl1);
- x2 += len;
-
- /* draw "Tune" */
- cptr = "Tune";
- /*
- XDrawString (display, window, gc, x2, ys, cptr, len = strlen (cptr));
- XDrawString (display, window, gc, x2 + 1, ys, cptr, len);
- */
- XDrawString (display, pixmap, gc, x2, ys, cptr, len = strlen (cptr));
- XDrawString (display, pixmap, gc, x2 + 1, ys, cptr, len);
- x2 += fwidth * len;
-
- /* draw the black line after "Tune" */
- /*
- XDrawLine (display, window, gc,
- x2 + FGAP + 1, yl1,
- x2 + (len = (fwidth * 10)), yl1);
- */
- XDrawLine (display, pixmap, gc,
- x2 + FGAP + 1, yl1,
- x2 + (len = (fwidth * 10)), yl1);
- y += fheight;
-
- #ifdef SVR32
- #ifndef XSW32v5
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_ageintvl ", "%5d", current_server -> my_tune -> t_ageinterval);
- y += fheight;
- #endif
- #endif
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_bdflushr ", "%5d", current_server -> my_tune -> t_bdflushr);
- y += fheight;
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_gpgshi ", "%5d", current_server -> my_tune -> t_gpgshi);
- y += fheight;
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_gpgslo ", "%5d", current_server -> my_tune -> t_gpgslo);
- y += fheight;
- #ifndef XSW32v5
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_gpgsmsk ", "0x%03lx", current_server -> my_tune -> t_gpgsmsk);
- y += fheight;
- #endif
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_maxfc ", "%5d", current_server -> my_tune -> t_maxfc);
- y += fheight;
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_maxsc ", "%5d", current_server -> my_tune -> t_maxsc);
- y += fheight;
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_maxumem ", "%5d", current_server -> my_tune -> t_maxumem);
- y += fheight;
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_minarmem ", "%5d", current_server -> my_tune -> t_minarmem);
- y += fheight;
- disp_static_int (window, display, gc, DrawAreaXYWH, pixmap, x, y, "t_minasmem ", "%5d", current_server -> my_tune -> t_minasmem);
-
- return (y);
- } /* end of draw_Tune */
-
- /* vi: set tabstop=4 shiftwidth=4: */
- /* end of tune.c */
-